home *** CD-ROM | disk | FTP | other *** search
- PROGRAM RT
-
-
- This program translates a program written in the RATBAS language to an
- equivalent program in BASIC.
-
- The program is run from DOS. To begin, simply type RT. For example:
-
- A> RT
-
- The program will then request the name of the file with the source
- code written in the RATBAS language (for details, see the entry under
- RATBAS in the user's manual). You may give the file name with or
- without a disk prefix. If no extension is given, .RAT is assumed.
-
- RT will next ask for the disk drive on which any referenced INCLUDE
- files are to be found. This may be given with or without a colon. If
- you press the carriage return, the default drive is assumed.
-
- Finally, RT will ask for the name of the BASIC program file to be
- created. If you press the carriage return, the name will be the same
- as that of the source file, but with a .BAS extension.
-
- There are three options.
-
- If you follow the name of the source (RATBAS) file with a semicolon,
- no further questions will be asked -- include files will be taken from
- the default drive and the BASIC file will be given the same name as
- the RATBAS file, but with a .BAS extension.
-
- If you follow the name of the source (RATBAS) file with "/N", the
- BASIC program will be created with no line numbers except where needed
- for GOSUB and GOTO statements. Such BASIC programs cannot be used with
- the BASIC interpreter, but they can be used with the Compiler. Since
- the compiler optimizes statements only from line number to line
- number, it is desirable to create a BASIC program with this option
- when you are ready to produce a compiled version (when using the
- compiler, you must also use the "/N" option).
-
- If you follow the name of the source (RATBAS) file with "/T", the BASIC
- program will be stripped of comments and leading spaces. This option may
- be necessary when translating a very large program with a single-sided
- disk drive. The /T option may be used with the /N option.
-
- While translating, RT produces a record of its progress. Each line in
- the RATBAS program is represented at the terminal. Standard BASIC
- statements are indicated by dots. Procedures are indicated by the
- procedure name, preceded by the line number of the procedure in the
- BASIC program. Lines referencing (calling) procedures are indicated by
- "p". RATBAS IF statements are indicated by I; RATBAS ELSE statements
- by "e"; and RATBAS IFEND statements by "i". RATBAS CASE statements are
- indicated by "C", selections within a case by "s", OTHERWISE
- statements by "o", and CEND statements by "c". When an Include file is
- read or completed, a message is printed at the terminal.
-
- When RT encounters an error, a message is printed and the user is
- given the option to continue or terminate. In many cases, continuation
- leads to useful information; in some, however, errors compound and
- subsequent "errors" are consequences of earlier ones. When errors are
- encountered, the BASIC program should not be used.
-
- For compatability with the BASIC compiler, a RATBAS program should have
- the form:
-
- COMMON ....
- DIM ....
-
- PROCEDURE ...
-
- PROCEDURE ...
-
- PROCEDURE ...
-
- PROGRAM
-
- For further details, see the entry under RATBAS in the user's manual.
-